package com.test;

import com.common.User;

import java.io.ObjectOutputStream;
import java.net.Socket;

/**
 * @author lxl
 * @date 2020/12/26 - 10:21
 */
public class MyClient {
    public static void main(String[] args) {
        new MyClient();
    }
    public MyClient(){
        try {
            Socket socket = new Socket("127.0.0.1",3456);
            ObjectOutputStream oos = new ObjectOutputStream( socket.getOutputStream());
            User u = new User();
            u.setName("lxl");
            u.setPwd("123");
            oos.writeObject(u);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
